xhypervisor 0.0.12

Hardware-accelerated virtualization on OS X
Documentation

xhypervisor

crates.io License

xhypervisor is a Rust library that taps into functionality that enables hardware-accelerated execution of virtual machines on OS X. It is a fork of hypervisor-rs and modified for the development of ehyve

It binds to the Hypervisor framework on OS X, and exposes a safe Rust interface through the hypervisor module, and an unsafe foreign function interface through the xhypervisor::ffi module.

A xhypervisor derived from the 16 bits VM is used as test example, which was original published in blog post http://www.pagetable.com/?p=764.

Prerequisites

To use this library, you need

  • OS X Yosemite (10.10), or newer

  • an Intel processor with the VT-x feature set that includes Extended Page Tables (EPT) and the Unrestricted Mode. To verify this, run and expect the following in your Terminal:

    $ sysctl kern.hv_support
    kern.hv_support: 1
    

Status

  • Accessing x86 registers
  • Accessing model-specific registers (MSRs)
  • Mapping guest physical memory segments into guest physical address space
  • Virtual CPUs
    • Executing and interrupting
    • Force flushing cached state
    • Invalidating translation lookaside buffer (TLB)
    • Accessing floating point (FP) and SIMD state
    • Obtaining cumulative execution time
    • Synchronizing guest timestamp-counters (TSC)
  • Accessing fields of Virtual Machine Control Structures (VMCS)